<?php
	class Taskstagstable_model extends DbManage_model
	{
		var $strTable='tasks_tags';
		var $strPrimaryKey='id';
		var $strForeignKey='taskId';
		
		function updateTagsOfTask($arrData,$intTaskId)
		{
			$this->delete(array($this->strForeignKey=>$intTaskId));
			foreach ($arrData as $arrVal)
			{
				$arrVal[$this->strForeignKey]=$intTaskId;
				$this->insert($arrVal);
			}
		}
	}